﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SynoManager.DownloadStation.Search
{
    /// <summary>
    /// Abstract base class for Search Results.
    /// </summary>
    public abstract class SearchResultBase : ISearchResult
    {
        /// <summary>SearchEngine for which the result was created</summary>
        protected readonly ISearchEngine engine;

        /// <summary>
        /// Create a new instance of <see cref="SearchResultBase" />.
        /// </summary>
        /// <param name="engine">Engine for which the result is created</param>
        public SearchResultBase(ISearchEngine engine)
        {
            this.engine = engine;
        }

        /// <summary>Gets the title of the task.</summary>
        public abstract string Title { get; }

        /// <summary>Gets the filesize of the result.</summary>
        public abstract long Size { get; }

        /// <summary>Gets the category for the result.</summary>
        public abstract string Category { get; }

        /// <summary>Gets the download url.</summary>
        public abstract string DownloadUrl { get; }

        /// <summary>Gets the url for more information.</summary>
        public abstract string MoreInfoUrl { get; }

        /// <summary>Gets the number of available seeders.</summary>
        public abstract int Seeders { get; }

        /// <summary>Gets the number of available leechers.</summary>
        public abstract int Leechers { get; }

        /// <summary>
        /// Gets or sets the mode for providing results
        /// </summary>
        public ResultMode ResultMode { get; set; }
    }
}
